<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>主界面</title>
    <style type="text/css">
    	a{
    		text-decoration: none;
    	}
    	 body{
  background:url(image/bg.jpg);
  background-size:1400px 768px;
  }
    </style>
  </head>
  
  <body>
    <center>
	 	欢迎&nbsp;&nbsp;&nbsp;${user.username }&nbsp;&nbsp;&nbsp;登陆您的通讯录
	 	<br/><br/><br/>
	 		<a href="${pageContext.request.contextPath }/addcontact.jsp">添加通讯人</a>
	 		<a href="${pageContext.request.contextPath }/writecontact">导出所有通讯人</a>
	 	<hr/>
	 	${msg }
	 	<table border="1">
	 		<c:forEach items="${contact}" var="con">
	 			<tr>
	 				<td>姓名：&nbsp;&nbsp;${con.name }&nbsp;&nbsp;</td>
	 				<td>备注：&nbsp;&nbsp;${con.rem }&nbsp;&nbsp;</td>
	 				<td>电话：&nbsp;&nbsp;${con.phone }&nbsp;&nbsp;</td>
	 				<td>地址：&nbsp;&nbsp;${con.addr }&nbsp;&nbsp;</td>
	 				<td><a href="${pageContext.request.contextPath }/findcontactbyid?id=${con.id}">修改</a></td>
	 				<td><a href="${pageContext.request.contextPath }/deletecontactbyid?id=${con.id}">删除</a></td>
	 			</tr>
	 		</c:forEach>
	 	</table>
	 </center>
  </body>
</html>
